<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>BIBLIO: /home/marco/workspace/biblio/src/bibserver.c File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">BIBLIO
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">/home/marco/workspace/biblio/src/bibserver.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Server del progetto BIBLIO.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;fcntl.h&gt;</code><br/>
<code>#include &lt;pthread.h&gt;</code><br/>
<code>#include &lt;signal.h&gt;</code><br/>
<code>#include &lt;stdio.h&gt;</code><br/>
<code>#include &lt;stdlib.h&gt;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
<code>#include &lt;unistd.h&gt;</code><br/>
<code>#include &lt;sys/stat.h&gt;</code><br/>
<code>#include &lt;sys/types.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="bib_8h_source.html">bib.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="biblio_8h_source.html">biblio.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="bibserver_8h_source.html">bibserver.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="comsock_8h_source.html">comsock.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="worker_8h_source.html">worker.h</a>&quot;</code><br/>
</div><table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bibserver_8c.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a> (int argc, char **argv)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Main del server biblio.  <a href="#a3c04138a5bfe5d72780bb7e82a18e627"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bibserver_8c.html#a09f8b3afade17ca6082330f22a4e1aac">init</a> (char *bib_name, char *records_filename)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bibserver_8c.html#a84e414317c5f9ca3e549c1c419f2acc4">save</a> (char *bib_name)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Funzione di salvataggio dei record.  <a href="#a84e414317c5f9ca3e549c1c419f2acc4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bibserver_8c.html#a4d04cb98d237318ce61bc06c2689ab52">serve</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Funzione che realizza il ciclo di funzionamento del server; accettazione nuove connessioni dai client creazione thread per servire le richieste.  <a href="#a4d04cb98d237318ce61bc06c2689ab52"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bibserver_8c.html#a4fff03cf2cf1cf3eb796eea94106e343">signal_handling</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Gestione dei segnali del server.  <a href="#a4fff03cf2cf1cf3eb796eea94106e343"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bibserver_8c.html#a45659e3b4b13b6182b3488b65445d1b1">sigterm_handler</a> (int signum)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bibserver_8c.html#a39700da94d4f9ed72d839a039a412170">sigint_handler</a> (int signum)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bibserver_8c.html#a62913e326020658f53898c82400b2d76">sigpipe_handler</a> (int signum)</td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bibserver_8c.html#ae83dc7cad3011262684c15e319959370">sockpath</a> [<a class="el" href="comsock_8h.html#a7baab2aa5bf8eb14b6128e0f16634837">UNIX_PATH_MAX</a>]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">FILE *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bibserver_8c.html#ab25a3625a8efbaa3d81ef27bbb51c9c5">logfile</a> = NULL</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct tm *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bibserver_8c.html#a17c48460db08d68bf4193816c7f8bb7d">loan_end</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">pthread_mutex_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bibserver_8c.html#aa16a39555f8535b9b4415f27438d84f0">biblio_mtx</a> = PTHREAD_MUTEX_INITIALIZER</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="bib_8h.html#a20e8400f11091455ae779864b085d5cd">scheda_t</a> **&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bibserver_8c.html#a679e2c9d4e63b4a587a4e5974ceb63e8">biblio</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">pthread_mutex_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bibserver_8c.html#ae4a93cc82852a2f213b19f75bfe77220">workers_mtx</a> = PTHREAD_MUTEX_INITIALIZER</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bibserver_8c.html#ab18693215565ea1a797096dfe19e895f">records</a> = 0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bibserver_8c.html#aa462bab367c8aac56ebc986ad8f4e30c">sc</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bibserver_8c.html#a143cf4916e069eed8183e88ae3d3a937">lookup_table</a> [] = {_AUTORE, _TITOLO, _EDITORE, _LUOGO_PUBBLICAZIONE, _ANNO, _COLLOCAZIONE, _DESCRIZIONE_FISICA, _NOTA}</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">volatile sig_atomic_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bibserver_8c.html#a76e062e417a81d02cafa0330f3013ea8">pending_signal</a> = 0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structworker__t.html">worker_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bibserver_8c.html#a85f885170b1295864d706ee0ec77d66d">wlist</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bibserver_8c.html#a5d5476e9901ea49888c5f6e12585a104">wlist_dim</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Server del progetto BIBLIO. </p>
<dl class="author"><dt><b>Author:</b></dt><dd>Marco Luisi Si dichiara che il contenuto di questo file e' in ogni sua parte opera originale dell' autore. </dd></dl>
</div><hr/><h2>Function Documentation</h2>
<a class="anchor" id="a09f8b3afade17ca6082330f22a4e1aac"></a><!-- doxytag: member="bibserver.c::init" ref="a09f8b3afade17ca6082330f22a4e1aac" args="(char *bib_name, char *records_filename)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="bibserver_8h.html#a20fc82d55de724cea43db877925aff49">init</a> </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>bib_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>records_filename</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Inizializzazione del server: apre i file e il socket, carica le schede bibliografiche. Restituisce codice di errore in caso di problemi. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">bib_name</td><td>nome della biblioteca </td></tr>
    <tr><td class="paramname">record_filename</td><td>nome del file con i record da caricare </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>esito della inizializzazione. </dd></dl>
<p>File dei record da caricare</p>
<p>Path del socket del server </p>

<p>References <a class="el" href="comsock_8c.html#ab4f598fd4b9d510f1feae85436ef9ebc">createServerChannel()</a>, <a class="el" href="bib_8c.html#aeb2bac0603823ee1f0e22b8f43728b1e">load_records()</a>, <a class="el" href="bibserver_8c.html#a17c48460db08d68bf4193816c7f8bb7d">loan_end</a>, <a class="el" href="bibserver_8c.html#ab25a3625a8efbaa3d81ef27bbb51c9c5">logfile</a>, <a class="el" href="bibserver_8c.html#ab18693215565ea1a797096dfe19e895f">records</a>, <a class="el" href="bibserver_8c.html#aa462bab367c8aac56ebc986ad8f4e30c">sc</a>, <a class="el" href="bibserver_8c.html#a4fff03cf2cf1cf3eb796eea94106e343">signal_handling()</a>, <a class="el" href="bibserver_8c.html#ae83dc7cad3011262684c15e319959370">sockpath</a>, and <a class="el" href="comsock_8h.html#a7baab2aa5bf8eb14b6128e0f16634837">UNIX_PATH_MAX</a>.</p>

<p>Referenced by <a class="el" href="bibserver_8c.html#a3c04138a5bfe5d72780bb7e82a18e627">main()</a>.</p>

</div>
</div>
<a class="anchor" id="a3c04138a5bfe5d72780bb7e82a18e627"></a><!-- doxytag: member="bibserver.c::main" ref="a3c04138a5bfe5d72780bb7e82a18e627" args="(int argc, char **argv)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="testserv_8c.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&#160;</td>
          <td class="paramname"><em>argv</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Main del server biblio. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">argv</td><td>Opzioni di lancio del client </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Exit status del programma </dd></dl>

<p>References <a class="el" href="comsock_8c.html#a36c68f60410ffdbb559bb256959def46">closeServerChannel()</a>, <a class="el" href="bibclient_8h.html#a1ebf69baf0d09a7865b0fbcfd59c48f6">ERR_PARAM</a>, <a class="el" href="bibserver_8c.html#a09f8b3afade17ca6082330f22a4e1aac">init()</a>, <a class="el" href="bibserver_8c.html#a84e414317c5f9ca3e549c1c419f2acc4">save()</a>, <a class="el" href="bibserver_8c.html#aa462bab367c8aac56ebc986ad8f4e30c">sc</a>, <a class="el" href="bibserver_8c.html#a4d04cb98d237318ce61bc06c2689ab52">serve()</a>, <a class="el" href="bibserver_8c.html#ae83dc7cad3011262684c15e319959370">sockpath</a>, and <a class="el" href="bibserver_8c.html#a85f885170b1295864d706ee0ec77d66d">wlist</a>.</p>

</div>
</div>
<a class="anchor" id="a84e414317c5f9ca3e549c1c419f2acc4"></a><!-- doxytag: member="bibserver.c::save" ref="a84e414317c5f9ca3e549c1c419f2acc4" args="(char *bib_name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="bibserver_8h.html#a84e414317c5f9ca3e549c1c419f2acc4">save</a> </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>bib_name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Funzione di salvataggio dei record. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">logfile</td><td>file di log </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>res esito del salvataggio </dd></dl>
<p>Contatore dei record salvati correttamente</p>
<p>Esito della funzione </p>

<p>References <a class="el" href="bibserver_8c.html#ab25a3625a8efbaa3d81ef27bbb51c9c5">logfile</a>, <a class="el" href="bibserver_8c.html#ab18693215565ea1a797096dfe19e895f">records</a>, <a class="el" href="bibclient_8c.html#aca0c4f41341a2be05205f12c5431ba8f">res</a>, <a class="el" href="bib_8c.html#ab3eb1b5de833e2fff25a542111a76ad0">store_records()</a>, and <a class="el" href="comsock_8h.html#a7baab2aa5bf8eb14b6128e0f16634837">UNIX_PATH_MAX</a>.</p>

<p>Referenced by <a class="el" href="bibserver_8c.html#a3c04138a5bfe5d72780bb7e82a18e627">main()</a>.</p>

</div>
</div>
<a class="anchor" id="a4d04cb98d237318ce61bc06c2689ab52"></a><!-- doxytag: member="bibserver.c::serve" ref="a4d04cb98d237318ce61bc06c2689ab52" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="bibserver_8h.html#a4d04cb98d237318ce61bc06c2689ab52">serve</a> </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Funzione che realizza il ciclo di funzionamento del server; accettazione nuove connessioni dai client creazione thread per servire le richieste. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>esito funzione </dd></dl>

<p>References <a class="el" href="comsock_8c.html#a870654a1e9b336f13271a7cfa0836920">acceptConnection()</a>, <a class="el" href="worker_8c.html#ac0781212d1b3ce609824009bbfc0b4a2">client_connection</a>, <a class="el" href="bibserver_8c.html#a76e062e417a81d02cafa0330f3013ea8">pending_signal</a>, <a class="el" href="bibserver_8c.html#aa462bab367c8aac56ebc986ad8f4e30c">sc</a>, <a class="el" href="bibserver_8c.html#a85f885170b1295864d706ee0ec77d66d">wlist</a>, and <a class="el" href="bibserver_8c.html#ae4a93cc82852a2f213b19f75bfe77220">workers_mtx</a>.</p>

<p>Referenced by <a class="el" href="bibserver_8c.html#a3c04138a5bfe5d72780bb7e82a18e627">main()</a>.</p>

</div>
</div>
<a class="anchor" id="a39700da94d4f9ed72d839a039a412170"></a><!-- doxytag: member="bibserver.c::sigint_handler" ref="a39700da94d4f9ed72d839a039a412170" args="(int signum)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void <a class="el" href="bibserver_8h.html#a39700da94d4f9ed72d839a039a412170">sigint_handler</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>signum</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Gestore del segnale SIGINT </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">signum</td><td></td></tr>
  </table>
  </dd>
</dl>

<p>References <a class="el" href="bibserver_8c.html#a76e062e417a81d02cafa0330f3013ea8">pending_signal</a>.</p>

<p>Referenced by <a class="el" href="bibserver_8h.html#a4fff03cf2cf1cf3eb796eea94106e343">signal_handling()</a>.</p>

</div>
</div>
<a class="anchor" id="a4fff03cf2cf1cf3eb796eea94106e343"></a><!-- doxytag: member="bibserver.c::signal_handling" ref="a4fff03cf2cf1cf3eb796eea94106e343" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="bibserver_8h.html#a4fff03cf2cf1cf3eb796eea94106e343">signal_handling</a> </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Gestione dei segnali del server. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>esito della funzione </dd></dl>

<p>References <a class="el" href="bibserver_8c.html#a39700da94d4f9ed72d839a039a412170">sigint_handler()</a>, <a class="el" href="bibserver_8c.html#a62913e326020658f53898c82400b2d76">sigpipe_handler()</a>, and <a class="el" href="bibserver_8c.html#a45659e3b4b13b6182b3488b65445d1b1">sigterm_handler()</a>.</p>

<p>Referenced by <a class="el" href="bibserver_8h.html#a20fc82d55de724cea43db877925aff49">init()</a>.</p>

</div>
</div>
<a class="anchor" id="a62913e326020658f53898c82400b2d76"></a><!-- doxytag: member="bibserver.c::sigpipe_handler" ref="a62913e326020658f53898c82400b2d76" args="(int signum)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void <a class="el" href="bibserver_8h.html#a62913e326020658f53898c82400b2d76">sigpipe_handler</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>signum</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Gestore del segnale SIGPIPE </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">signum</td><td></td></tr>
  </table>
  </dd>
</dl>

<p>References <a class="el" href="bibserver_8c.html#a76e062e417a81d02cafa0330f3013ea8">pending_signal</a>.</p>

<p>Referenced by <a class="el" href="bibserver_8h.html#a4fff03cf2cf1cf3eb796eea94106e343">signal_handling()</a>.</p>

</div>
</div>
<a class="anchor" id="a45659e3b4b13b6182b3488b65445d1b1"></a><!-- doxytag: member="bibserver.c::sigterm_handler" ref="a45659e3b4b13b6182b3488b65445d1b1" args="(int signum)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void <a class="el" href="bibserver_8h.html#a45659e3b4b13b6182b3488b65445d1b1">sigterm_handler</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>signum</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Gestore del segnale SIGTERM </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">signum</td><td></td></tr>
  </table>
  </dd>
</dl>

<p>References <a class="el" href="bibserver_8c.html#a76e062e417a81d02cafa0330f3013ea8">pending_signal</a>.</p>

<p>Referenced by <a class="el" href="bibserver_8h.html#a4fff03cf2cf1cf3eb796eea94106e343">signal_handling()</a>.</p>

</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="a679e2c9d4e63b4a587a4e5974ceb63e8"></a><!-- doxytag: member="bibserver.c::biblio" ref="a679e2c9d4e63b4a587a4e5974ceb63e8" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="bib_8h.html#a20e8400f11091455ae779864b085d5cd">scheda_t</a>** <a class="el" href="worker_8c.html#a679e2c9d4e63b4a587a4e5974ceb63e8">biblio</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Array per le schede bibliografiche </p>

</div>
</div>
<a class="anchor" id="aa16a39555f8535b9b4415f27438d84f0"></a><!-- doxytag: member="bibserver.c::biblio_mtx" ref="aa16a39555f8535b9b4415f27438d84f0" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">pthread_mutex_t <a class="el" href="worker_8c.html#aa16a39555f8535b9b4415f27438d84f0">biblio_mtx</a> = PTHREAD_MUTEX_INITIALIZER</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Mutex per la biblioteca </p>

</div>
</div>
<a class="anchor" id="a17c48460db08d68bf4193816c7f8bb7d"></a><!-- doxytag: member="bibserver.c::loan_end" ref="a17c48460db08d68bf4193816c7f8bb7d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct tm* <a class="el" href="worker_8c.html#a17c48460db08d68bf4193816c7f8bb7d">loan_end</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Data di fine prestito </p>

<p>Referenced by <a class="el" href="bibserver_8h.html#a20fc82d55de724cea43db877925aff49">init()</a>.</p>

</div>
</div>
<a class="anchor" id="ab25a3625a8efbaa3d81ef27bbb51c9c5"></a><!-- doxytag: member="bibserver.c::logfile" ref="ab25a3625a8efbaa3d81ef27bbb51c9c5" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">FILE* <a class="el" href="worker_8c.html#ab25a3625a8efbaa3d81ef27bbb51c9c5">logfile</a> = NULL</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>File di log </p>

<p>Referenced by <a class="el" href="bibserver_8h.html#a20fc82d55de724cea43db877925aff49">init()</a>, and <a class="el" href="bibserver_8h.html#a84e414317c5f9ca3e549c1c419f2acc4">save()</a>.</p>

</div>
</div>
<a class="anchor" id="a143cf4916e069eed8183e88ae3d3a937"></a><!-- doxytag: member="bibserver.c::lookup_table" ref="a143cf4916e069eed8183e88ae3d3a937" args="[]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* <a class="el" href="worker_8c.html#a143cf4916e069eed8183e88ae3d3a937">lookup_table</a>[] = {_AUTORE, _TITOLO, _EDITORE, _LUOGO_PUBBLICAZIONE, _ANNO, _COLLOCAZIONE, _DESCRIZIONE_FISICA, _NOTA}</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Tabella di lookup comune agli workers </p>

<p>Referenced by <a class="el" href="worker_8h.html#a1a52066dd4cd954d0d04f7ccdcb3872d">lookup()</a>.</p>

</div>
</div>
<a class="anchor" id="a76e062e417a81d02cafa0330f3013ea8"></a><!-- doxytag: member="bibserver.c::pending_signal" ref="a76e062e417a81d02cafa0330f3013ea8" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">volatile sig_atomic_t <a class="el" href="bibserver_8c.html#a76e062e417a81d02cafa0330f3013ea8">pending_signal</a> = 0</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Variabile di controllo ricezione segnale </p>

<p>Referenced by <a class="el" href="bibserver_8h.html#a4d04cb98d237318ce61bc06c2689ab52">serve()</a>, <a class="el" href="bibserver_8c.html#a39700da94d4f9ed72d839a039a412170">sigint_handler()</a>, <a class="el" href="bibserver_8c.html#a62913e326020658f53898c82400b2d76">sigpipe_handler()</a>, and <a class="el" href="bibserver_8c.html#a45659e3b4b13b6182b3488b65445d1b1">sigterm_handler()</a>.</p>

</div>
</div>
<a class="anchor" id="ab18693215565ea1a797096dfe19e895f"></a><!-- doxytag: member="bibserver.c::records" ref="ab18693215565ea1a797096dfe19e895f" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="worker_8c.html#ab18693215565ea1a797096dfe19e895f">records</a> = 0</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Numero di libri della biblioteca </p>

<p>Referenced by <a class="el" href="bibserver_8h.html#a20fc82d55de724cea43db877925aff49">init()</a>, <a class="el" href="bib_8h.html#aeb2bac0603823ee1f0e22b8f43728b1e">load_records()</a>, <a class="el" href="bibserver_8h.html#a84e414317c5f9ca3e549c1c419f2acc4">save()</a>, and <a class="el" href="bib_8h.html#ab3eb1b5de833e2fff25a542111a76ad0">store_records()</a>.</p>

</div>
</div>
<a class="anchor" id="aa462bab367c8aac56ebc986ad8f4e30c"></a><!-- doxytag: member="bibserver.c::sc" ref="aa462bab367c8aac56ebc986ad8f4e30c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="bibserver_8c.html#aa462bab367c8aac56ebc986ad8f4e30c">sc</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Server channel </p>

<p>Referenced by <a class="el" href="bibserver_8h.html#a20fc82d55de724cea43db877925aff49">init()</a>, <a class="el" href="bibserver_8c.html#a3c04138a5bfe5d72780bb7e82a18e627">main()</a>, <a class="el" href="comsock_8h.html#a88e5df18d7721b744bed4208fc97c3bb">openConnection()</a>, and <a class="el" href="bibserver_8h.html#a4d04cb98d237318ce61bc06c2689ab52">serve()</a>.</p>

</div>
</div>
<a class="anchor" id="ae83dc7cad3011262684c15e319959370"></a><!-- doxytag: member="bibserver.c::sockpath" ref="ae83dc7cad3011262684c15e319959370" args="[UNIX_PATH_MAX]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char <a class="el" href="bibserver_8c.html#ae83dc7cad3011262684c15e319959370">sockpath</a>[<a class="el" href="comsock_8h.html#a7baab2aa5bf8eb14b6128e0f16634837">UNIX_PATH_MAX</a>]</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Path del socket del server </p>

<p>Referenced by <a class="el" href="bibserver_8h.html#a20fc82d55de724cea43db877925aff49">init()</a>, and <a class="el" href="bibserver_8c.html#a3c04138a5bfe5d72780bb7e82a18e627">main()</a>.</p>

</div>
</div>
<a class="anchor" id="a85f885170b1295864d706ee0ec77d66d"></a><!-- doxytag: member="bibserver.c::wlist" ref="a85f885170b1295864d706ee0ec77d66d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structworker__t.html">worker_t</a>* <a class="el" href="bibserver_8c.html#a85f885170b1295864d706ee0ec77d66d">wlist</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Lista dei thread worker </p>

<p>Referenced by <a class="el" href="bibserver_8c.html#a3c04138a5bfe5d72780bb7e82a18e627">main()</a>, and <a class="el" href="bibserver_8h.html#a4d04cb98d237318ce61bc06c2689ab52">serve()</a>.</p>

</div>
</div>
<a class="anchor" id="a5d5476e9901ea49888c5f6e12585a104"></a><!-- doxytag: member="bibserver.c::wlist_dim" ref="a5d5476e9901ea49888c5f6e12585a104" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="bibserver_8c.html#a5d5476e9901ea49888c5f6e12585a104">wlist_dim</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Dimensione della lista dei thread worker </p>

</div>
</div>
<a class="anchor" id="ae4a93cc82852a2f213b19f75bfe77220"></a><!-- doxytag: member="bibserver.c::workers_mtx" ref="ae4a93cc82852a2f213b19f75bfe77220" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">pthread_mutex_t <a class="el" href="worker_8c.html#ae4a93cc82852a2f213b19f75bfe77220">workers_mtx</a> = PTHREAD_MUTEX_INITIALIZER</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Mutex per la gestione degli workers </p>

<p>Referenced by <a class="el" href="bibserver_8h.html#a4d04cb98d237318ce61bc06c2689ab52">serve()</a>.</p>

</div>
</div>
</div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Fri Jun 29 2012 10:36:44 for BIBLIO by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
